# Load the data
data_set_url <- paste0("https://raw.githubusercontent.com/owid/owid-datasets/refs/heads/master/",
"datasets/Human%20Height%20-%20NCD%20RisC%20(2017)/Human%20Height%20-%20NCD%20RisC%20(2017).csv")
height_data <- read.csv(data_set_url)
# Function to format height as "feet' inches""
format_height <- function(height_values) {
feet <- floor(height_values / 12)
inches <- round(height_values %% 12, 1)
paste0(feet, "' ", inches, '"')
}Homework 4
\(\\\)
Introduction
This scrollytelling explores how the mean height of men has changed from 1896 to 1996 in different countries in the world.
\(\\\)
Questions I will look at are:
How has the mean height of men in different countries and continents changed over time?
Which countries have the tallest and shortest mean height in 1996 (the most recent year in the data)?
Which country showed the greatest change in mean height from 1896 to 1996?
The data comes from Our World in Data, and was compiled by the NCD Risk Factor Collaboration based on a paper in The Lancet.
While the Lancent is a well-respected journal, I do not know much about the data itself so I not sure exactly how reliable it is.
\(\\\)
Loading and tranforming the data
Let’s now load the data and transform it so that it is in a shape that is easy to analyze and visualize.
\(\\\)
\(\\\)
\(\\\)
Results
Analysis 1: Changes height in time and across continents
\(\\\)
To start our analysis, let’s look at how the mean heights have changed over time, and how the mean heights compare between different continents.
\(\\\)
\(\\\)
\(\\\)
Analysis 2: Tallest and shortest mean height in 1996
\(\\\)
Let’s now explore the countries with the tallest and shortest mean height in 1996, which is the most recent year in the data.
\(\\\)
\(\\\)
\(\\\)
Analysis 3: Greatest change in heights from 1896 to 1996
\(\\\)
Finally, let’s explore which country had the greatest change in mean height from 1896 to 1996. We will calculate the difference in mean height for each country and then plot the results.
\(\\\)
\(\\\)
\(\\\)
Conclusion
In this analysis, we explored how the mean height of people in different countries has changed over time, specifically from 1896 to 1996. We found that:
The mean height has generally increased across all continents, with Europe having the highest mean height.
The country with the tallest mean height in 1996 was the Netherlands, while the country with the shortest mean height was Yemen.
The country with the greatest change in mean height from 1896 to 1996 was Iran, where the average height increased by 6.5 inches.
Questions that remain are what is the reason for the differences in mean height across countries and continents, and why have they changed over time. Future analyses could explore the factors that contribute to these differences, such as nutrition, health care, and socioeconomic status. This could be done by combining the data used here with other data sets such as the Gapminder data. Additionally, it would be interesting to see how these trends continue in the years following 1996.
\(\\\)
Reflection
I am a little concerned this homework might be a bit too difficult, but I will see how everyone does!